// pages/gallery/gend.js
Page({
  custom(e) {
    console.log(e);
  },
  /**
   * 页面的初始数据
   */
  data: {

  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad(options) {

  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady() {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow() {

  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide() {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload() {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh() {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom() {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage() {

  }
})
var e = require("../../common/vendor.js"),
  r = require("../../api/ajax.js"),
  i = require("../../config/config.js"),
  t = require("../../uni_modules/z-paging/components/z-paging/js/z-paging-mixin.js");

require("../../api/service.js"), require("../../utils/luch-request/core/Request.js"),
  require("../../utils/luch-request/core/dispatchRequest.js"), require("../../utils/luch-request/adapters/index.js"),
  require("../../utils/luch-request/helpers/buildURL.js"), require("../../utils/luch-request/utils.js"),
  require("../../utils/luch-request/core/buildFullPath.js"), require("../../utils/luch-request/helpers/isAbsoluteURL.js"),
  require("../../utils/luch-request/helpers/combineURLs.js"), require("../../utils/luch-request/core/settle.js"),
  require("../../utils/luch-request/core/InterceptorManager.js"), require("../../utils/luch-request/core/mergeConfig.js"),
  require("../../utils/luch-request/core/defaults.js"), require("../../utils/luch-request/utils/clone.js"),
  require("../../uni_modules/u-store/js_sdk/Storage.js");

var s = {
  mixins: [t.ZPMixin],
  props: {
    id: {
      type: String
    }
  },
  setup: function (r) {
    var i = r.id,
      t = e.useStore();
    return {
      id: i,
      upInfo: function (e) {
        t.commit("showCar/upInfo", e);
      },
      showCar: t.state.showCar
    };
  },
  data: function () {
    return {
      base: i.base,
      keywords: "",
      dataList: [],
      loading: !0,
      list: [{
          "text": "珠光粉红",
          "url": "http://che.fuliaoxx.com/uploads/20240508/9dfee0498c8d42ae219f496d66185aa8.jpg"
        }, {
          "text": "改色定制彩绘",
          "url": "http://che.fuliaoxx.com/uploads/20240508/dcb607447be36061bc704bf9827f1767.jpg"
        }, {
          "text": "反光绿",
          "url": "http://che.fuliaoxx.com/uploads/20240508/71134e9915a9e72d9d9c9a938955c36a.jpg"
        }, {
          "text": "小米SU7原厂色",
          "url": "http://che.fuliaoxx.com/uploads/20240508/49ea8e4025e6152e51b2c3b85d2d1768.jpg"
        }, {
          "text": "PET内格罗尼",
          "url": "http://che.fuliaoxx.com/uploads/20240508/0c2705f11c2c194a0c1c84bcc34b3fea.jpg"
        }, {
          "text": "珠光粉红",
          "url": "http://che.fuliaoxx.com/uploads/20240508/d936475e46946de4145326ef10f62d05.jpg"
        }, {
          "text": "概念版冰莓粉",
          "url": "http://che.fuliaoxx.com/uploads/20240508/ac9e14901c69ec342ee7d5f60199d972.jpeg"
        }, {
          text: 'PET维密紫',
          url: 'http://che.fuliaoxx.com/uploads/20240508/7ea142071216b249a56f8f75d1f61334.jpg'
        },
        {
          text: '流星蓝PET小米SU7原厂色',
          url: 'http://che.fuliaoxx.com/uploads/20240508/9441a0f9f416872e0cc80c87f95c6b7a.jpeg'
        },
        {
          text: 'PET哑概念版冰莓粉',
          url: 'http://che.fuliaoxx.com/uploads/20240508/b10e70d58f3a20c1d60355ee6d36fe59.jpg'
        },
        {
          text: '哑面寒武岩灰',
          url: 'http://che.fuliaoxx.com/uploads/20240508/cb3ae043ada11399bfc2cd21ce55423c.jpg'
        },
        {
          text: '改色定制，彩绘',
          url: 'http://che.fuliaoxx.com/uploads/20240508/b3a0c65bec5a5a5cdaae957ae01b7dae.jpg'
        },

        {
          text: '概念版冰莓粉',
          url: 'http://che.fuliaoxx.com/uploads/20240508/64870d16bf1e93a6ff596471ed1e6237.jpg'
        },
        {
          text: '哑面寒武岩灰',
          url: 'http://che.fuliaoxx.com/uploads/20240508/e379542b985224440418f1389635f898.jpg'
        },
        {
          text: 'PET维密紫',
          url: 'http://che.fuliaoxx.com/uploads/20240508/e379542b985224440418f1389635f898.jpg'
        },
        {
          text: '概念版冰莓粉',
          url: 'http://che.fuliaoxx.com/uploads/20240508/f6023c44bfbcdc70e93add3af889ba52.jpg'
        }, {
          "text": "PET内格罗尼",
          "url": "http://che.fuliaoxx.com/uploads/20240508/9f738f4092ef2d2802ba489f01b70a77.jpg"
        }, {
          "text": "改色定制彩绘",
          "url": "http://che.fuliaoxx.com/uploads/20240508/519e3332f8a14292ffb45323f977a484.jpg"
        },
        {
          text: '流星蓝PET小米SU7原厂色',
          url: 'http://che.fuliaoxx.com/uploads/20240508/81c8258e189bc03ddf291f2dea6fe3e3.jpg'
        }, {
          "text": "珠光粉红",
          "url": "http://che.fuliaoxx.com/uploads/20240508/db96379b0388ca8ba89ff8e594521923.jpg"
        }
      ]
    };
  },
  methods: {
    change: function (e) {
      
      var r = this;
      r.list=[{
        "text": "珠光粉红",
        "url": "http://che.fuliaoxx.com/uploads/20240508/9dfee0498c8d42ae219f496d66185aa8.jpg"
      }, {
        "text": "改色定制彩绘",
        "url": "http://che.fuliaoxx.com/uploads/20240508/dcb607447be36061bc704bf9827f1767.jpg"
      }, {
        "text": "反光绿",
        "url": "http://che.fuliaoxx.com/uploads/20240508/71134e9915a9e72d9d9c9a938955c36a.jpg"
      }, {
        "text": "小米SU7原厂色",
        "url": "http://che.fuliaoxx.com/uploads/20240508/49ea8e4025e6152e51b2c3b85d2d1768.jpg"
      }, {
        "text": "PET内格罗尼",
        "url": "http://che.fuliaoxx.com/uploads/20240508/0c2705f11c2c194a0c1c84bcc34b3fea.jpg"
      }, {
        "text": "珠光粉红",
        "url": "http://che.fuliaoxx.com/uploads/20240508/d936475e46946de4145326ef10f62d05.jpg"
      }, {
        "text": "概念版冰莓粉",
        "url": "http://che.fuliaoxx.com/uploads/20240508/ac9e14901c69ec342ee7d5f60199d972.jpeg"
      }, {
        text: 'PET维密紫',
        url: 'http://che.fuliaoxx.com/uploads/20240508/7ea142071216b249a56f8f75d1f61334.jpg'
      },
      {
        text: '流星蓝PET小米SU7原厂色',
        url: 'http://che.fuliaoxx.com/uploads/20240508/9441a0f9f416872e0cc80c87f95c6b7a.jpeg'
      },
      {
        text: 'PET哑概念版冰莓粉',
        url: 'http://che.fuliaoxx.com/uploads/20240508/b10e70d58f3a20c1d60355ee6d36fe59.jpg'
      },
      {
        text: '哑面寒武岩灰',
        url: 'http://che.fuliaoxx.com/uploads/20240508/cb3ae043ada11399bfc2cd21ce55423c.jpg'
      },
      {
        text: '改色定制，彩绘',
        url: 'http://che.fuliaoxx.com/uploads/20240508/b3a0c65bec5a5a5cdaae957ae01b7dae.jpg'
      },

      {
        text: '概念版冰莓粉',
        url: 'http://che.fuliaoxx.com/uploads/20240508/64870d16bf1e93a6ff596471ed1e6237.jpg'
      },
      {
        text: '哑面寒武岩灰',
        url: 'http://che.fuliaoxx.com/uploads/20240508/e379542b985224440418f1389635f898.jpg'
      },
      {
        text: 'PET维密紫',
        url: 'http://che.fuliaoxx.com/uploads/20240508/e379542b985224440418f1389635f898.jpg'
      },
      {
        text: '概念版冰莓粉',
        url: 'http://che.fuliaoxx.com/uploads/20240508/f6023c44bfbcdc70e93add3af889ba52.jpg'
      }, {
        "text": "PET内格罗尼",
        "url": "http://che.fuliaoxx.com/uploads/20240508/9f738f4092ef2d2802ba489f01b70a77.jpg"
      }, {
        "text": "改色定制彩绘",
        "url": "http://che.fuliaoxx.com/uploads/20240508/519e3332f8a14292ffb45323f977a484.jpg"
      },
      {
        text: '流星蓝PET小米SU7原厂色',
        url: 'http://che.fuliaoxx.com/uploads/20240508/81c8258e189bc03ddf291f2dea6fe3e3.jpg'
      }, {
        "text": "珠光粉红",
        "url": "http://che.fuliaoxx.com/uploads/20240508/db96379b0388ca8ba89ff8e594521923.jpg"
      }
    ]
      var a = [];
      var k = 0;
      //循环判断符合要求的数据
      for (var j = 0; j < r.list.length; j++) {
        //数据中不包含搜索内容值的返回-1
        if (r.list[j].text.indexOf(r.keywords) != -1) {
          a[k++] = r.list[j];
        }
      }
      r.list=a
      console.log(a);
    },
    queryList: function (e, i) {
      var t = this;
      r.doPostUrl("gallery.Gallery/index", {
        categroy_id: this.id,
        keywords: this.keywords,
        page: e,
        limit: i
      }).then(function (e) {
        console.log("queryList", e.data.data), t.$refs.paging.complete(e.data.data);
      });
    },
    goDetail: function (r) {
      console.log(r);
      let t=this
      let arr=[]
      t.list.map(m=>{
        arr.push(m.url)
      })
      wx.previewImage({
        current: arr[r], // 当前显示图片的http链接，将点击图片的索引数指定好
        urls:arr // 需要预览的图片http链接列表
      })
    }
  }
};

Array || (e.resolveComponent("uv-search") + e.resolveComponent("uv-image") + e.resolveComponent("z-paging"))(),
  Math || (function () {
    return "../../uni_modules/uv-search/components/uv-search/uv-search.js";
  } + function () {
    return "../../uni_modules/uv-image/components/uv-image/uv-image.js";
  } + function () {
    return "../../uni_modules/z-paging/components/z-paging/z-paging.js";
  })();

var u = e._export_sfc(s, [
  ["render", function (r, i, t, s, u, n) {
    return {
      a: e.o(n.change),
      b: e.o(n.change),
      c: e.o(function (e) {
        return u.keywords = e;
      }),
      d: e.p({
        modelValue: u.keywords
      }),
      e: e.f(u.list, function (r, i, t) {
        return {
          a: "7117908c-2-" + t + ",7117908c-0",
          b: e.p({
            width: "330rpx",
            mode: "widthFix",
            src: r.url
          }),
          c: e.t(r.text),
          d: e.o(function (e) {
            return n.goDetail(i);
          })
        };
      }),
      f: e.sr("paging", "7117908c-0"),
      g: e.o(n.queryList),
      h: e.o(function (e) {
        return u.list = e;
      }),
      i: e.p({
        modelValue: u.dataList
      })
    };
  }]
]);

wx.createPage(u);